Ubuntu 16.04
Sponsored Link

OpenStack Newton : Configure Keystone#2
2016/11/15
 
Add Users or Roles, Services and others in Keystone.
[1] Load environment variables first.
The value for "OS_PASSWORD" is from the password when configuring keystone bootstrap.
For "OS_AUTH_URL", specify Keystone server's hostname or IP address.
root@dlp:~#
vi ~/keystonerc
export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=adminpassword
export OS_AUTH_URL=http://10.0.0.30:35357/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
export PS1='\u@\h \W(keystone)\$ '
root@dlp:~#
chmod 600 ~/keystonerc

root@dlp:~#
source ~/keystonerc

root@dlp ~(keystone)#
echo "source ~/keystonerc " >> ~/.bash_profile
[2] Add Projects.
# add service project

root@dlp ~(keystone)#
openstack project create --domain default --description "Service Project" service

+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Service Project                  |
| domain_id   | default                          |
| enabled     | True                             |
| id          | e2fed44089aa40dc88f5ae6ed9dfe915 |
| is_domain   | False                            |
| name        | service                          |
| parent_id   | default                          |
+-------------+----------------------------------+

# confirm settings

root@dlp ~(keystone)#
openstack project list

+----------------------------------+---------+
| ID                               | Name    |
+----------------------------------+---------+
| 1b8227c2c89e4f1cbcbbb9f6060b0416 | admin   |
| e2fed44089aa40dc88f5ae6ed9dfe915 | service |
+----------------------------------+---------+
[3] Add Roles.
# add Member role

root@dlp ~(keystone)#
openstack role create Member

+-----------+----------------------------------+
| Field     | Value                            |
+-----------+----------------------------------+
| domain_id | None                             |
| id        | 940b5bddb7cd4e4592b750768435a481 |
| name      | Member                           |
+-----------+----------------------------------+

# confirm settings

root@dlp ~(keystone)#
openstack role list

+----------------------------------+--------+
| ID                               | Name   |
+----------------------------------+--------+
| 940b5bddb7cd4e4592b750768435a481 | Member |
| ebad6695e2ac4c42a287b91e898fcc31 | admin  |
+----------------------------------+--------+
 
Tweet